<template>
    <div class="enroll_cent">
        <div class="enroll_success">
            <p></p>
            <p>恭喜您 {{this.username}}</p>
            <p>你已成功注册为商城用户，祝你购物愉快~</p>
        </div>
    </div>


</template>

<script>
import {decryptDes} from "@/utill/des";

export default {
    name: "sucessEnroll",
    components: {},
    data(){
        return{
            username:'',
            countDown:''
        }

    },
    methods:{
        countDao () {
            console.log('加密的秘钥'+this.$store.state.EBC)
            const count = 3
            let that=this;
            this.countDown = count;
            this.timers = setInterval(() => {
                if (that.countDown > 0) {
                    that.countDown--
                } else {
                    clearInterval(this.timers)
                    // 登录成功后进行跳转到的页面
                    that.$router.push('/login')
                }
            }, 1000)
        }
    },
    created() {
        this.countDao();
        this.username=JSON.parse(decryptDes(this.$route.query.username, this.$store.state.EBC));
    },

}
</script>

<style scoped>
.enroll_cent{
    width: 1260px;
    height: auto;
    min-height: 407px;
    /*居中设置*/
    margin: auto;
    margin-bottom: 80px;
}
.enroll_cent .enroll_success{
    margin-top: 100px;
}

.enroll_cent .enroll_success p:nth-child(1){
    margin: auto;
    width: 80px;
    height: 80px;
    background-image: url("@/assets/icon/y_icon.png");
    background-size: cover;
}
.enroll_cent .enroll_success p:nth-child(2){
    font-size: 35px;
    color: #333333;
}
.enroll_cent .enroll_success p:nth-child(3){
    font-size: 25px;
    color: #faccc6;
}

</style>